//
//  UIContainer.h
//  storeapp
//
//  Created by huangyi on 13-3-18.
//  Copyright (c) 2013年 ios. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIContainer : UIScrollView

@property(nonatomic,assign)id dataSource;

-(void)reloadView;
-(void)removeInvisibleView;
-(UIView*)reuseableViewWithIdentifier:(NSString*)str;
-(UIView*)newViewWithIdentifier:(NSString*)str;

@end

@protocol UIContainerDataSource <NSObject>

@required
-(int)numberOfViewInContainerView:(UIContainer*)container;
-(CGRect)containerView:(UIContainer*)container rectOfViewAtIndex:(int)index;
-(UIView*)containerView:(UIContainer*)container viewAtIndex:(int)index;

@optional
-(void)containerView:(UIContainer*)container didSelectView:(UIView*)view atIndex:(int)index;
-(void)containerView:(UIContainer *)container didScrollTo:(UIView *)view atIndex:(int)index;
@end
